import { FormInstance } from 'antd'
import { Gutter } from 'antd/es/grid/row'
import { CSSProperties } from 'react'

export interface IOption {
  label: string | number
  value: string | number
  disabled?: boolean
}
export interface ISearchProps {
  form: FormInstance
  searchConfig: IItemArray[]
  onFinish: (value: any) => void
  onReset: () => void
  style?: CSSProperties
  className?: string
  initialValues?: object
  loading?: boolean
  onValuesChange?: (...set: any) => void
  extra?: string | React.ReactNode
  isFold?: boolean
}

export interface IEditProps {
  form: FormInstance
  editConfig: IItemArray[]
  isNotModal?: boolean //是否用于modal中 在modal中自动居中 不在modal中会页面靠左
  footer?: string | React.ReactNode
  initialValues?: object
  className?: string
  gutter?: Gutter | [Gutter, Gutter]
  onValuesChange?: (...set: any) => void
  header?: React.ReactNode
  children?: React.ReactNode
  grid?: any
}
